package com.sunday.common.mq.rabbit.study.spring.study.e3_Receiving_Messages;

import com.google.gson.Gson;
import jakarta.validation.constraints.Max;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class ValidatedClass implements Serializable {

    @Max(10)
    private int bar;

    public int getBar() {
        return this.bar;
    }

    public void setBar(int bar) {
        this.bar = bar;
    }

    @Override
    public String toString() {
        return new Gson().toJson(this);
    }

}
